home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / fs / efs_bitmap.h.z / efs_bitmap.h
C/C++ Source or Header  |  1992-04-03  |  2KB  |  67 lines

  1. #ifndef __SYS_EFS_BITMAP_H__
  2. #define __SYS_EFS_BITMAP_H__
  3.  
  4. /**************************************************************************
  5.  *                                      *
  6.  *          Copyright (C) 1988, Silicon Graphics, Inc.          *
  7.  *                                      *
  8.  *  These coded instructions, statements, and computer programs  contain  *
  9.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  10.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  11.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  12.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  13.  *                                      *
  14.  **************************************************************************/
  15.  
  16. #ident "$Revision: 4.4 $"
  17.  
  18. extern int    efs_bitfunc();
  19.  
  20. #define EFS_TESTFREE        1
  21. #define EFS_TESTALLOC        2
  22. #define EFS_BITFIELDFREE    3
  23. #define EFS_BITFIELDALLOC    4
  24. #define EFS_BITFIELDSYNCFREE    5
  25. #define EFS_BITFIELDSYNCALLOC    6
  26.  
  27. /*
  28.  * Return count of number of contigous set (free) bits (max len bits)
  29.  * in bitmap for fs starting at b.
  30.  */
  31.  
  32. #define efs_tstfree(fs, b, len)    efs_bitfunc(fs, b, len, EFS_TESTFREE)
  33.  
  34. /*
  35.  * Return count of number of contigous clear (allocated) bits
  36.  * (max len bits) in bitmap for fs starting at b.
  37.  */
  38.  
  39. #define    efs_tstalloc(fs, b, len)    efs_bitfunc(fs, b, len, EFS_TESTALLOC)
  40.  
  41. /*
  42.  * Set (mark free) a bit field of length len in bitmap for fs starting at b.
  43.  */
  44.  
  45. #define    efs_bitfree(fs, b, len)    efs_bitfunc(fs, b, len, EFS_BITFIELDFREE)
  46.  
  47. /*
  48.  * as above but do the write synchronously 
  49.  */
  50.  
  51. #define    efs_bitfreesync(fs, b, len)    efs_bitfunc(fs, b, len, EFS_BITFIELDSYNCFREE)
  52.  
  53. /*
  54.  * Clear (mark allocated) a bit field of length len in bitmap for fs
  55.  * starting at b.
  56.  */
  57.  
  58. #define    efs_bitalloc(fs, b, len)    efs_bitfunc(fs, b, len, EFS_BITFIELDALLOC)
  59.  
  60. /*
  61.  * as above but do the write synchronously 
  62.  */
  63.  
  64. #define    efs_bitallocsync(fs, b, len)    efs_bitfunc(fs, b, len, EFS_BITFIELDSYNCALLOC)
  65.  
  66. #endif /* __SYS_EFS_BITMAP_H__ */
  67.